package com.heihx.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class Knife4jConfiguration {

    /**
     * 配置接口文档基本信息
     * @return
     */
    @Bean
    public OpenAPI springShopOpenApi(){
        return new OpenAPI()
                .info(new Info().title("外卖demo")
                        .description("基于Knife4j OpenApi3的接口测试文档")
                        .version("1.0.0")
                        .contact(new Contact().name("heihx")
                                .email("2080036037@qq.com")));
    }
}
